<template>
  <div class="container bg-white">
    <div class="page-warpper"></div>
    <div
      class="empty"
      :v-model="showEmptyContent"
    >
      <div class='square-block'>
        <div class='square-block-dummy'></div>
        <div class='square-block-box'>
          <img :src="empty.image" />
        </div>
      </div>
      <h2 class="empty-tips">{{ empty.title }}</h2>
    </div>
  </div>

</template>

<script>
export default {
  data () {
    return {
      showEmptyContent: false,
      empty: {
        image:
          'https://s10.mogucdn.com/p2/161213/upload_2ie7eb3ae0khl20g0g1glgb852e5i_514x260.png',
        title: '还没有任何反馈哦',
        button: '',
        tip: ''
      }
    }
  },
  created () {
    let id = this.$route.params.id
    this.axios
      .get('/activity/default/' + id)
      .then(response => {
        let data = response.data
        if (!data) {
          console.log(data)
          this.showEmptyContent = true
        } else {
          document.title = data.name
        }
        console.log(this.showEmptyContent)
      })
      .catch(function (error) {
        console.log(error)
      })
  }
}
</script>
